package org.dromara.xxmj.domain.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.dromara.xxmj.domain.CourseExercise;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 习题视图对象
 *
 * @author Vincent
 */
@Data
@AutoMapper(target = CourseExercise.class)
@Schema(description = "习题视图对象")
public class CourseExerciseVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    /**
     * 习题ID
     */
    @Schema(description = "习题ID")
    private Long id;

    /**
     * 课程ID
     */
    @Schema(description =  "课程ID")
    private Long courseId;

    /**
     * 视频ID
     */
    @Schema(description = "视频ID")
    private Long videoId;

    /**
     * 题目内容
     */
    @Schema(description = "题目内容")
    private String title;


    /**
     * 题目类型（0单选 1多选 2判断）
     */
    @Schema(description = "题目类型")
    private String type;

    private String questionType;

    /**
     * 选项内容（JSON格式）
     */
    @Schema(description = "选项内容")
    private String options;

    /**
     * 选项列表
     */
    @Schema(description = "选项列表")
    private List<Map<String, String>> optionList;

    /**
     * 正确答案
     */
    @Schema(description = "正确答案")
    private String answer;

    /**
     * 用户答案
     */
    @Schema(description = "用户答案")
    private String userAnswer;

    /**
     * 解析
     */
    @Schema(description = "解析")
    private String analysis;

    /**
     * 图片
     */
    @ExcelProperty(value = "图片")
    private String image;

    /**
     * 是否收藏
     */
    @Schema(description = "是否收藏")
    private Integer isCollect;
}
